package com.hl.service;

import com.hl.mapper.ConsultantExcellenceMapper;
import com.hl.pojo.ConsultantExcellence;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ConsultantExcellenceServiceImpl implements ConsultantExcellenceService{
    @Autowired
    private ConsultantExcellenceMapper consultantExcellenceMapper;

    @Override
    public Integer add(ConsultantExcellence consultantExcellence) {
        return consultantExcellenceMapper.add(consultantExcellence);
    }

    @Override
    public List<ConsultantExcellence> findAll() {
        return consultantExcellenceMapper.findAll();
    }

    @Override
    public Integer del(Integer consultantId, Integer excellenceId) {
        return consultantExcellenceMapper.del(consultantId,excellenceId);
    }

    @Override
    public List<ConsultantExcellence> findByConsultantId(Integer consultantId) {
        return consultantExcellenceMapper.findByConsultantId(consultantId);
    }

    @Override
    public List<ConsultantExcellence> findByExcellenceId(Integer excellenceId) {
        return consultantExcellenceMapper.findByExcellenceId(excellenceId);
    }

    @Override
    public Integer update(Integer newExcellenceId , Integer consultantId , Integer oldExcellenceId) {
        return consultantExcellenceMapper.update(newExcellenceId,consultantId,oldExcellenceId);
    }
}
